package com.android.personal.finance;

import com.android.personal.data.FinanceDataAdaptater;
import com.android.personal.finance.R;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;


public class PersonalFinance extends TabActivity  {
    /** Called when the activity is first created. */
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
  		 super.onCreate(savedInstanceState);
    	 setContentView(R.layout.main);

    	 TabHost tabHost = getTabHost();
    	 TabHost.TabSpec spec;
    	 Intent intent;
    	 
    	 intent	= new Intent().setClass(this, OverviewActivity.class);
    	 
    	 spec = tabHost.newTabSpec("overview").setIndicator("Overview").setContent(intent);
    	 tabHost.addTab(spec);
    	 
    	 intent	= new Intent().setClass(this, AccountsActivity.class);

    	 spec = tabHost.newTabSpec("accounts").setIndicator("Accounts").setContent(intent);
    	 tabHost.addTab(spec);
    	 
    	 intent	= new Intent().setClass(this, OperationsActivity.class);
    	
    	 spec = tabHost.newTabSpec("operations").setIndicator("Operations").setContent(intent);
    	 tabHost.addTab(spec);
    	 
    	 FinanceDataAdaptater.CreateFinanceDataAdaptater(this);
    	 FinanceDataAdaptater.open();
    	    
    	 tabHost.setCurrentTab(0);

    }
}